﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Storehouse
{
    class Program
    {
        static void Main(string[] args)
        {
            Stack stack = new Stack();
            stack.Push("张三");
            stack.Push("李四");
            stack.Push("王五");
            stack.Push("李华");
            //获取栈顶元素
            Console.WriteLine(stack.Peek());
            //出栈
            Console.WriteLine(stack.Pop());






            /* Stack stack = new Stack();
             //向栈中存放元素
             stack.Push("1 号盘子");
             stack.Push("2 号盘子");
             stack.Push("3 号盘子");
             stack.Push("4 号盘子");
             stack.Push("5 号盘子");
             Console.WriteLine("取出盘子：");
             //检查栈中是否有元素
             while (stack.Count != 0)
             {
                 Console.WriteLine(stack.Pop());
             }*/
        }
    }
}
